package com.opengw.beans.support;

import org.primefaces.event.TabChangeEvent;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

@Controller("templateConfigController")
@Scope("session")
public class TemplateConfigController {
	private int menuaccordionPanelIndex;
	transient private final String menuTab = "menuTab";
	
	public TemplateConfigController(){
		System.out.println("*******************TEMPLATE GİRDİ*************");
	}
	
	public void onTabChange(TabChangeEvent event) {
		menuaccordionPanelIndex = Integer.parseInt(event.getTab().getId().substring(menuTab.length()));
	}

	public void setMenuaccordionPanelIndex(int menuaccordionPanelIndex) {
		this.menuaccordionPanelIndex = menuaccordionPanelIndex;
	}

	public int getMenuaccordionPanelIndex() {
		return menuaccordionPanelIndex;
	}
}
